//Monday, December 14 2009
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class ConsecutiveNumbers
{
public:
	vector <int> missingNumber(vector <int> numbers)
	{
		sort(numbers.begin(), numbers.end());
		vector<int> ret;
		ret.clear();
		//if(0 == (int)numbers.size()) return ret;
		int count = 0;
		for(int i=0; i+1<numbers.size(); i++)
		{
			if(numbers[i+1] - numbers[i] > 2 || numbers[i+1] - numbers[i] == 0)
				return ret;
			if(numbers[i+1] - numbers[i] > 1)
				count ++;
			if(count >1)
				return ret;
		}
		if(count == 0)
		{
			if(numbers[0]-1>=1)
				ret.push_back(numbers[0]-1);
			ret.push_back(numbers[numbers.size()-1]+1);
			return ret;
		}
		if(count == 1)
		{
			for(int i=0; i+1<numbers.size(); i++)
				if(numbers[i+1] - numbers[i] > 1)
				{
					ret.push_back(numbers[i]+1);
					return ret;
				}
		}
		return ret;
	}
};
